<template>
  <el-container>
    <el-aside width="200px">
      <h2>管理员菜单</h2>
      <el-menu :default-active="$router.currentRoute.value.name">
        <router-link :to="{name:'admin-booking'}">
          <el-menu-item index="admin-booking">
            <el-icon>
              <Checked/>
            </el-icon>
            <span>订单管理</span>
          </el-menu-item>
        </router-link>
        <router-link :to="{name:'admin-transport'}">
          <el-menu-item index="admin-transport">
            <el-icon>
              <Van/>
            </el-icon>
            <span>运输管理</span>
          </el-menu-item>
        </router-link>
        <router-link :to="{name:'admin-money'}">
          <el-menu-item index="admin-money">
            <el-icon>
              <Money/>
            </el-icon>
            <span>财务管理</span>
          </el-menu-item>
        </router-link>
        <el-sub-menu index="admin-company">
          <template #title>
            <router-link :to="{name:'admin-company'}">
              <el-icon>
                <Avatar/>
              </el-icon>
              <span>公司管理</span>
            </router-link>
          </template>
          <router-link :to="{name:'admin-company-operator'}">
            <el-menu-item index="admin-company-operator">操作员管理</el-menu-item>
          </router-link>
          <router-link :to="{name:'admin-company-driver'}">
            <el-menu-item index="admin-company-driver">司机管理</el-menu-item>
          </router-link>
          <router-link :to="{name:'admin-company-warehouse'}">
            <el-menu-item index="admin-company-warehouse">仓库管理</el-menu-item>
          </router-link>
          <router-link :to="{name:'admin-company-truck'}">
            <el-menu-item index="admin-company-truck">货车管理</el-menu-item>
          </router-link>
        </el-sub-menu>
        <router-link :to="{name:'admin-statistic'}">
          <el-menu-item index="admin-statistic">
            <el-icon>
              <DataAnalysis/>
            </el-icon>
            <span>统计分析</span>
          </el-menu-item>
        </router-link>
      </el-menu>
    </el-aside>
    <el-main>
      <router-view/>
    </el-main>
  </el-container>
</template>

<script>
import {Checked, Van, Money, Avatar, DataAnalysis} from '@element-plus/icons-vue'

export default {
  name: "AdminView",
  data() {
    return {}
  },
  components: {
    Checked, Van, Money, Avatar, DataAnalysis
  }
}
</script>

<style scoped>

</style>
